package com.atguigu.excel.excelRead.excelWrite;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.util.Map;

/**
 * @Auther: fangshicai
 * @Date: 2022/1/25 21:29
 * @Description: 要建一个继承AnalysisEventListener的监听器
 */
public class MyAnalysisEventListener extends AnalysisEventListener<DataDemo> {
    //一行一行的读
    @Override
    public void invoke(DataDemo data, AnalysisContext analysisContext) {
        System.out.println("数据"+data);
    }

    //输出表头
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        System.out.println("表头"+headMap);
    }


    //读取完成后
    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }




}
